﻿namespace ASBCC.Business
{
    #region Using Directives

    using System.Data;
    using Database.Service;

    #endregion

    public class EZVisitBusiness
    {
        /// <summary>
        /// Gets the specific contract information by contract No.
        /// Result will contain 2 tables: the 1st one is the collection of all available contracts.
        /// the 2nd one returns the ONGOING amount of all same named contracts used by EZVisit applications.
        /// </summary>
        /// <param name="contractno">The contractno.</param>
        /// <returns>The result dataset.</returns>
        public DataSet GetContractInfoByNo(string contractno)
        {
            return ProcedureManager.usp3_Select_ContractInfoByNo(contractno);
        }

        public DataTable GetContractsByAppId(int appId)
        {
            return ProcedureManager.usp3_Select_EZVisitContracts(appId).Tables[0];
        }

        public DataTable GetMyActivities(int userId)
        {
            return ProcedureManager.usp3_Select_MyEZVisitActivities(userId).Tables[0];
        }

        public DataTable GetMyDrafts(int userId)
        {
            return ProcedureManager.usp3_Select_MyEZVisitDrafts(userId).Tables[0];
        }

        public DataTable GetMyParticipation(int userId)
        {
            return ProcedureManager.usp3_Select_MyEZVisitParticipation(userId).Tables[0];
        }
    }
}